<%--
    工程名：HebeuCS
    时间：16-11-3 下午9:09
    作者：白雨濃 evil
    邮箱：evilbai@foxmail.com
    内容：用户登录界面
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page trimDirectiveWhitespaces="true" %>
<!DOCTYPE html>
<html>
<head>
    <title>用户登录</title>

    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">

    <%@include file="common/basehead.jsp" %>

    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/qqbackground.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/login-register.js"></script>
    <link href="${pageContext.request.contextPath}/static/css/login-register.css" rel="stylesheet">
</head>
<body>
<div class="main">
    <div id="container" class="background">
        <div id="anitOut"></div>
    </div>
    <br>
    <div class="card">
        <div id="card-login" class="login-card">
            <h3>登录</h3>
            <div style="height: 30px"></div>
            <div class="form-horizontal" role="form" style="width: 80%;margin: auto">
                <div class="form-group">
                    <label for="username" class="col-sm-2 control-label">账号</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="username"
                               placeholder="请输入学号">
                    </div>
                </div>
                <div class="form-group">
                    <label for="userpassword" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-10">
                        <input type="password" class="form-control" id="userpassword"
                               onkeyup="value=value.replace(/[\W]/g,'') "
                               onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
                               placeholder="请输入密码">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <div class="checkbox">
                            <ul>
                                <li style="float: left">
                                    <label><input id="remember" type="checkbox" name="remember">记住密码</label>
                                </li>
                                <li style="float: right">
                                    <a id="forget_password" style="color:white;" href="#">忘记密码？</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div style="height: 10px"></div>
            <button id="login_submit" type="submit" class="btn btn-info" style="width: 200px;">提交登录</button>
            <br>
            <a data-toggle="modal" data-target="#register" style="color: white;margin: 2px">注册账号</a>
            <div style="height: 12px"></div>

            <div id="error_dialog" class="alert alert-danger" style="width: 90%;margin: auto;display: none">
            </div>

            <div id="login_progress" style="display: none">
                <div class="progress progress-striped active" style="width: 90%;margin:10px auto">
                    <div id="progress" class="progress-bar progress-bar-success" role="progressbar"
                         aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
                         style="width: 100%;">
                    </div>
                </div>

                <div style="margin: 10px">
                    <span>正在登录……</span>
                </div>
            </div>
        </div>
    </div>
</div>
<%--弹出层--注册--%>
<%@include file="register.jsp" %>
</body>
<script>
    $(function ()
    {
        /*todo:原方法兼容性有问题,暂时抛弃后面的背景*/
        $('#card-login').fadeIn(2000);
    });


    $(function ()
    {
        <%--背景--%>
        background.qb();
        <%--忘记密码--%>
        login_register.forget();
        <%--动画--%>
        //login_register.startanimate();
        <%--登录--%>
        login_register.login();
        <%--注册--%>
        login_register.register();
    });
</script>
</html>